import { NumberSetter } from '../_setters/number-setter'

const FormContainerMeta = {
  componentName: 'FormContainer',
  title: '表单',
  docUrl: '',
  screenshot: '',
  devMode: 'proCode',
  group: '基础组件',
  hidden: true,
  // "schema": {hidden: true},
  category: '基础字段',
  npm: {
    "package": "ui-material",
    "version": "0.1.0",
    "exportName": "FormContainer",
    "main": "src/index.tsx",
    "destructuring": true,
    "subName": ""
  },
  configure: {
    props: [
      {
        title: {
          label: {
            'type': 'i18n',
            'en-US': 'gutterX',
            'zh-CN': '横向间距',
          },
          tip: '单位px',
        },
        name: 'gutterX',
        description: '横向间距',
        supportVariable: false,
        setter: {
          componentName: NumberSetter,
          isRequired: true,
          initialValue: 6,
          props: {
            placeholder: '请输入横向间距',
            step: 2,
            min: 0,
          },
        },
      },
      {
        title: {
          label: {
            'type': 'i18n',
            'en-US': 'gutterY',
            'zh-CN': '纵向间距',
          },
          tip: '单位px',
        },
        name: 'gutterY',
        description: '纵向间距',
        supportVariable: false,
        setter: {
          componentName: NumberSetter,
          isRequired: true,
          initialValue: 6,
          props: {
            placeholder: '请输入纵向间距',
            step: 2,
            min: 0,
          },
        },
      },
    ],
    supports: {
      style: true,
      // events: ['onFinish'],
    },
    component: {
      isContainer: true,
      disableBehaviors: ['remove', 'copy'],
      // 允许拖入的组件白名单
      // childWhitelist: ['Table', 'Button'],
      // 同理也可以设置该组件允许被拖入哪些父组件里
      // parentWhitelist: ['Tab'],
    },
  },
};
const snippets = [
  {
    title: '表单',
    screenshot: '',
    // "hidden": true,
    schema: {
      componentName: 'FormContainer',
      props: {
        // cols: 2,
        style: {
          width: '100%',
        },
      },
    },
  },
];

export default {
  ...FormContainerMeta,
  snippets,
};
